package org.huntaway.io;

import java.io.File;

public class CirculateDir {
	public void circulate(File file, AbstractTask task) {
		if (file.isDirectory()) {
			if (new DirCheck().execute(file))
				return;
			File[] fileArr = file.listFiles();
			for (int i = 0; i < fileArr.length; i++) {
				circulate(fileArr[i], task);
			}
		} else {
			task.execute(file);
		}
	}
}
